layui.define(function(exports){
	var a= 1
	,admin = layui.admin
	,view = layui.view
	,events =layui.admin.events
	,$ = layui.$;
	layui.admin.popupLeft = function(options){
      //layer.close(admin.popup.index);
      othis = $(this)
      return admin.popup.index = layer.open($.extend({
        type: 1
        ,id: 'LAY_adminPopupL'
        ,offset: ['0px','316px']
	    ,move: false
	    ,shade: 0.1
	    ,shadeClose: true
        ,anim: -1
        ,title: false
        ,closeBtn: false
        ,skin: 'layui-anim layui-anim-zy'
        ,area:  ['300px','100%']
        ,end :function(){
	    	// $('*[data-aid='+admin.popup.index+']').css('background','#000')	
	    	$('*[data-aid='+admin.popup.index+']').removeClass('hov')	
	    }
        ,success: function(layero, index){
        	// layero.attr('data-aid',admin.popup.index)
	    	console.log(layero, index,othis,this);
	      // view(this.id).render('system/wifi')
	    }
	    
      }, options));
    }
    var extEvents = {
    	lbtn : function(){
	    	admin.popupLeft({
			    id: 'LAY_adminPopupLeft'
			    ,success: function(){
			      view(this.id).render('system/theme')
			    }
			});
	    },
	    t1: function(){
	      console.log('t1')
	    }
    }

    layui.admin.events = $.extend(events,extEvents)
    // layui.admin.events = {}
  //对外暴露的接口
  exports('exts', {});
});